home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / picture / coord.h < prev    next >
Text File  |  1993-09-23  |  984b  |  49 lines

  1. //    Copyright 1993 Ralph Gonzalez
  2.  
  3. /*
  4. *    FILE:        coord.h
  5. *    AUTHOR:        R. Gonzalez
  6. *    CREATED:    October 2, 1990
  7. *
  8. *    Defines 2D and 3D coordinate classes for the picture
  9. *    application.
  10. */
  11.  
  12. # ifndef    coord_h
  13. # define    coord_h
  14.  
  15. # include    "class.h"
  16. # include    "frame.h"
  17. # include    "trans.h"
  18.  
  19. /******************************************************************
  20. *   2D coordinate
  21. ******************************************************************/
  22. class    Coord2:public Generic_Class
  23. {
  24. public:
  25.     double            x;
  26.     double            y;
  27.     
  28.     Coord2(void);
  29.     virtual void    set(double,double);
  30.     virtual void    convert(Coord2*,Frame*,Frame*);
  31. };
  32.  
  33. /******************************************************************
  34. *   3D coordinate
  35. ******************************************************************/
  36. class    Coord3:public Generic_Class
  37. {
  38. public:
  39.     double            x;
  40.     double            y;
  41.     double            z;
  42.     
  43.     Coord3(void);
  44.     virtual void    set(double,double,double);
  45.     virtual void    apply(Coord3*,Transformation*);
  46.     virtual void    equate(Coord3*);
  47. };
  48.  
  49. # endif